Referring now to FIG. 1, a typical auto-focus (AF) module 10 for a camera module 12 within an image capture device can obtain an estimate for the distance from the camera module to the target object, for example, from a laser device or stereo camera system 14.
Knowing the estimated subject distance, the auto-focus module 10 can compute a required physical position for a lens 16 to bring the target object into focus. As explained in WO 2016/000874 (Ref: FN-396-PCT), the disclosure of which is herein incorporated by reference, lens position is typically controlled by a lens actuator 18 which is driven by a digital to analog convertor (DAC)—often using an 8-bit DAC code with 255 distinct voltage output levels, or a 10-bit DAC code with 1024 voltage levels—provided by the AF module 10. Thus the AF module 10 determines a required DAC code for a subject distance and the DAC converts the DAC code into an equivalent analog actuator voltage or current value depending on the actuator output circuitry, for example, depending on whether the lens 16 comprises a VCM (voice coil module) or MEMs (micro-electromechanical systems) lens actuator, to determine the lens position.
Once the relationship between DAC code and lens position is determined, for example, there can be a linear relationship between the two, the camera module can be calibrated by adjusting the DAC codes for infinity and macro distances:DACFAR[t] physical lens position to focus at far (infinity) distance at time[t]  [1]DACNEAR[t] physical lens position to focus at near (macro) distance at time[t]  [2]
These calibration parameters can be determined during a production line process (PLP) and their values stored in a non-volatile memory 20 inside the camera module 12 or elsewhere in the camera.
Thus, the auto-focus module 10 can determine the required DAC code to be supplied to the lens actuator 18 as a function of the distance to the target object as well as DACNEAR[t] and DACFAR[t].
It is known that the camera module 12 may be affected by operating conditions such as SAG (gravity influence) or thermal (temperature influence) and WO 2016/000874 (Ref: FN-396-PCT) discloses some methods to compensate for SAG and thermal effects by adjusting DACNEAR[t] and DACFAR [t] according to operating conditions.
Nonetheless, there may be other components contributing to calibration error including inaccuracies, due to some limitations of the PLP or, as disclosed in WO 2016/000874 (Ref: FN-395-PCT), camera module performance drifting over time, for example, due to device aging or even device on-time.
If PLP, SAG or thermal errors are not compensated accordingly, the DAC code computed by AF module will not provide proper focus on the target object.
The camera module may then be required to hunt for focus and this both impacts adversely on focus speed as well as causing an unacceptable lens wobble effect within a preview stream.
It is an object of the present application to mitigate these problems.